package com.itzixi;
/*
@Time     : 2025/3/14 20:46
@Author   : liujingmao
@ClassName: ChatConfig.java
@Description deepseek对话配置类
*/

import jakarta.annotation.Resource;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ChatConfig {

    @Resource
    private OpenAiChatModel openAiChatModel;

    @Bean
    public ChatClient chatClient() {
        return  ChatClient
                .builder(openAiChatModel)
                .defaultSystem("你是一个AI助手")
                .build();
    }

}
